<div class="gallery" ng-controller="ESPicturesEditCtrl as ctrl">

  <!-- Picture list -->
  <div ng-repeat="picture in pictures"
       class="item card card-gallery stable-bg"
       ng-class="{'in done': picture.isnew}">
    <div>
      <h2 ng-if="picture.title">{{picture.title}}</h2>
      <img ng-src="{{picture.src}}">
    </div>
    <div class="item done in tabs tabs-secondary tabs-icon-left">
      <a class="tab-item stable-bg assertive" ng-click="removePicture($index)"
         title="{{'COMMON.BTN_PICTURE_DELETE' | translate}}"
        ><i class="icon ion-trash-a"></i>{{'COMMON.BTN_PICTURE_DELETE'|translate}}</a>
      <a class="tab-item stable-bg dark"
         ng-click="rotatePicture($index)"
         title="{{'COMMON.BTN_PICTURE_ROTATE' | translate}}"
        ><i class="icon ion-forward"></i>{{'COMMON.BTN_PICTURE_ROTATE'|translate}}</a>
      <a class="tab-item stable-bg"
         ng-click="favoritePicture($index)"
         ng-class="{'gray': $index !== 0, 'positive': $index === 0}"
         title="{{'COMMON.BTN_PICTURE_FAVORISE' | translate}}"
        ><i class="icon ion-star"></i>{{'COMMON.BTN_PICTURE_FAVORISE'|translate}}</a>
    </div>
  </div>

  <!-- Add picture button -->
  <div class="item card card-gallery card-gallery-new text-center padding ink"
       ng-click="selectNewPicture('#pictureFile')">
    <i class="ion-image stable" style="font-size:150px"></i>
    <b class="ion-plus gray" style="font-size:80px; position:absolute; top:25px; right: 5px;"></b>
    <p translate>COMMON.BTN_ADD_PICTURE</p>
  </div>

  <input type="file" id="pictureFile" accept="image/*" onchange="angular.element(this).scope().fileChanged(event)"
         style="visibility:hidden; position:absolute;"/>
</div>

